home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / basic / sdoor100.zip / SDOOR.DOC < prev    next >
Text File  |  1992-03-25  |  19KB  |  551 lines

  1.                              Simple Door v1.0b
  2.  
  3.                             by SumWare Software
  4.                            Programmer: Roy Hooper
  5.                         Beta Basher: Rick Chartrand
  6.                      Documentation : Michelle Chartrand
  7.  
  8.                  Simple Door can be registered for $35 Cdn.
  9.  
  10.  
  11.         Simple Door was written for the use of anyone wishing to make a
  12.         door in QuickBasic 4.5.  Simple Door's main purpose was to create a
  13.         good, easy way to make good doors.
  14.  
  15.         Simple Door is a collection of routines that handle communications
  16.         through a FOSSIL driver and manage the user's time limit, and
  17.         carrier.  There are routines ranging from sending a string to
  18.         sending a file, getting a character and getting a string.
  19.  
  20.         Simple Door has many things to make your door look nice, including
  21.         only using ANSI routines if the user supports ANSI, and a status bar
  22.         with plenty of bits of information on it.  The status bar also has a
  23.         few controls on it which allow you to chat with the user, and
  24.         increase or decrease the user's time.  You can shell to DOS, boot
  25.         the user out of the door, or even turn off snoop.
  26.  
  27.         Simple Door is multi-node compatible, as it does no disk I/O and
  28.         relies on the door file for information on where to do its
  29.         communications I/O.  If you wish to support multi node, then your
  30.         door must support multinode internally.
  31.  
  32.         Simple Door does error handling for any error that might occur
  33.         internally.  If an error that it cannot handle occurs, then it will
  34.         just state it and exit.  Simple Door does not do error handling for
  35.         your program, only errors internal to Simple Door.  If you wish to
  36.         learn more about error handling for your program, take a look at ON
  37.         ERROR in your QuickBasic 4.5 manual.
  38.  
  39. - Using Simple Door -
  40.  
  41.         To use Simple Door inside one of your program, you need to include
  42.         the SDOOR.BI file.  SDOOR.BI can be located in your INCLUDE
  43.         directory, or in your QuickBasic program directory, or the current
  44.         directory.  SDOOR.QLB and SDOOR.LIB has to be located in a place
  45.         that QuickBasic can find then when it loads  up (usually your
  46.         LIBRARY directory or the QuickBasic program directory, or the
  47.         current directory).
  48.  
  49.         When loading QuickBasic, you need to tell QuickBasic about the
  50.         library.  To do this, you need to specify the library on the command
  51.         line.  Example:
  52.  
  53.         QB /LSDoor
  54.  
  55.         Inside your program, after your DECLARE SUB/FUNCTION lines, if any,
  56.         you need to place the following line:
  57.  
  58.         '$INCLUDE: 'SDOOR.BI'
  59.  
  60.         And then you are ready to program with Simple Door. (Don't forget to
  61.         initialize Simple Door).  One thing to keep in mind is Simple Door
  62.         has a 4 minute timeout limit.  After 3 minutes 30 seconds of no
  63.         keypresses, SDoor warns you with a beep that you have 30 seconds to
  64.         do something.
  65.  
  66.  
  67. - What Simple Door Can Do -
  68.  
  69.  
  70.                                  FUNCTIONS
  71.  
  72.    AColor$ (Fore%, Back%)
  73.         Makes an optimized ANSI color string
  74.         Fore% = Foreground color to use
  75.         Back% = Background color to use
  76.  
  77.         EXAMPLE:
  78.                 Send AColor$(7,1)+"White on blue"
  79.  
  80.        (q.v. SetColor for a complete list of colors)
  81.  
  82.    CtrlCK% ()
  83.         Checks if Control C/K have been checked.  Also enables Control C/K
  84.         checking.  Returns -1 if true, 0 if not true.
  85.  
  86.         EXAMPLE:
  87.                 IF CtrlCK% THEN
  88.                         FlushOut
  89.                         SendCr "Aborted."
  90.                 END IF
  91.  
  92.    Exist% (FileName$)
  93.         Returns a non-zero value if the file exists.
  94.  
  95.         EXAMPLE:
  96.                 IF Exist%("TEST.TTT") THEN Send "File FOUND"
  97.  
  98.    GetAnsi% ()
  99.         Gets the current ANSI setting.  Returns -1 if true, 0 if not true.
  100.  
  101.         EXAMPLE:
  102.                 AnsiMode%=GetAnsi%
  103.                 IF AnsiMode% THEN
  104.                         SendCr "Ansi is active"
  105.                 ELSE
  106.                         SendCr "Ansi is not active"
  107.                 END IF
  108.  
  109.    GetBBSName$ ()
  110.         Gets the bbs's name,  in all uppercase.
  111.  
  112.         EXAMPLE:
  113.                 Send "This program is registered to : " + GetBbsname$
  114.  
  115.    GetBaudRate& ()
  116.         Gets the current baud rate of the user (Door Info).  0 if local.
  117.  
  118.         EXAMPLE:
  119.                 Send "You are running at" + STR$(GetBaudRate&)
  120.  
  121.    GetCarrier% ()
  122.         Gets the current carrier state.  Non-zero if there is a carrier.
  123.         The user's carrier is automatically managed.  This is not really
  124.         needed.
  125.  
  126.         EXAMPLE:
  127.                 IF GetCarrier% THEN Send "YOU ARE STILL CONNECTED"
  128.  
  129.    GetPort% ()
  130.         Gets the current serial port setting.  -1 if local
  131.  
  132.         EXAMPLE:
  133.                 Send "You are on com port" + STR$(GetPort%)
  134.  
  135.    GetSecLevel& ()
  136.         Gets the user's security level.
  137.  
  138.         EXAMPLE:
  139.                 Send "Your security Level is" + STR$(GetSecLevel&)
  140.  
  141.    GetSnoopState% ()
  142.         Gets the status of the snoop setting on the SysOp's side.
  143.         Returns -1 if true, 0 if not.
  144.  
  145.         EXAMPLE:
  146.                 IF GetSnoopState% THEN
  147.                         Send "Snoop is ON"
  148.                 ELSE
  149.                         Send "Snoop is OFF"
  150.                 ENDIF
  151.  
  152.    GetSysopName$ ()
  153.         Gets the sysop's name,  in all uppercase.
  154.  
  155.         EXAMPLE:
  156.                 Send "Your sysop is: " + GetSysopname$
  157.  
  158.    GetTimeLeft% ()
  159.         Gets the amount of time the user has left in minutes.
  160.  
  161.         EXAMPLE:
  162.                 Send "You have" + STR$(GetTimeLeft%)+" minutes left."
  163.  
  164.    GetUserLocation$ ()
  165.         Gets the user's location (DOOR INFO) in all uppercase.
  166.  
  167.         EXAMPLE:
  168.                 Send "Your location is: " + GetUserLocation$
  169.  
  170.    GetUserName$ ()
  171.         Gets the user's name (DOOR INFO) in all uppercase.
  172.  
  173.         EXAMPLE:
  174.                 Send "Your name is: " + GetUserName$
  175.  
  176.  
  177.  
  178.                                 SUBROUTINES
  179.  
  180.    Center (St$)
  181.         Centers the specified text and stays on the same line.
  182.  
  183.         EXAMPLE:
  184.                 Center "Testing the centering routine"
  185.  
  186.    CenterCr (St$)
  187.         Centers the specified text and creates a new line.
  188.  
  189.         EXAMPLE:
  190.                 CenterCr "Testing the centering routine"
  191.  
  192.    Chat ()
  193.         Starts a chat mode with the user.  Restores the colors to normal
  194.         afterwards.
  195.  
  196.         EXAMPLE:
  197.                 SendCr "Forced CHAT:"
  198.                 Chat
  199.  
  200.  
  201.    ClearScreen ()
  202.         Clears the screen
  203.  
  204.         EXAMPLE:
  205.                 ClearScreen
  206.  
  207.   ComParms (BaudRate&, Flag$)
  208.         Sets the communications parameters.  These are already set upon
  209.         initialization.  There should be no need to play with them.
  210.  
  211.         BaudRate& can be:  300, 600, 1200, 2400, 4800, 9600, 19200, 38400
  212.         Flag$ takes the form of: "8N1" where the 8 can be replaced by:
  213.                                         5, 6, 7, 8   (Data bits)
  214.                                  and the N can be replaced by:
  215.                                         N, O, E      (Parity)
  216.                                  and the 1 can be replaced by:
  217.                                         1, 2         (Stop bits)
  218.  
  219.         EXAMPLE:
  220.                 ComParms 2400, "8N1"
  221.  
  222.    CtrlCKOn ()
  223.         Turns on Control-C/K checking.
  224.  
  225.         EXAMPLE:
  226.                 CtrlCKOn
  227.  
  228.    CtrlCKOff ()
  229.         Turns off Control-C/K checking.
  230.  
  231.         EXAMPLE:
  232.                 CtrlCKOff
  233.  
  234.    DeInitialize ()
  235.         Turns off the status bar and removes it from the screen.  Disables
  236.         the door driver and turns off the door driver's internal error
  237.         checking.  Also causes Send, SendCr, and all other routines to
  238.         malfunction.  DO NOT DO ANY OTHER DOOR DRIVER CALLS AFTER
  239.         DE INITIALIZING!  DOES NOT TERMINATE THE PROGRAM.
  240.  
  241.         EXAMPLE:
  242.                 DeInitialize
  243.